package com.zh.zhbootcommon.entity.taxi;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

import com.zh.zhbootcommon.domain.DBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 打车订单表
 * </p>
 *
 * @author JueDream
 * @since 2021-08-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("zh_taxi_order_info")
@ApiModel(value="DTaxiOrderInfo对象", description="打车订单表")
public class DTaxiOrderInfo extends DBaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "打车订单ID")
    @TableId(value = "order_id", type = IdType.AUTO)
    private Integer orderId;

    @ApiModelProperty(value = "打车订单号")
    @TableField("order_code")
    private String orderCode;

    /**
     * 订单状态(10-已创建(乘客发单) 20-已接单(司机接单) 30-待出发(司机抵达出发点) 40-待抵达(司机已接到乘客/行驶中) 50-待支付(司机抵达目的) 60-已支付(乘客已支付) 70-已完成  80-已取消)
     * 支付状态(10-订单创建(待支付) 20-支付中 30-支付成功 40-支付失败 50-支付取消)
     */
    @ApiModelProperty(value = "打车订单状态")
    @TableField("order_status")
    private Integer orderStatus;

    @ApiModelProperty(value = "乘客数量")
    @TableField("order_taxi_num")
    private Integer orderTaxiNum;

    @ApiModelProperty(value = "订单费用(以分为单位)")
    @TableField("order_price")
    private Integer orderPrice;

    @ApiModelProperty(value = "打车地址ID")
    @TableField("taxi_id")
    private Integer taxiId;

    @ApiModelProperty(value = "打车地址")
    @TableField(exist = false)
    private String taxiAddress;

    public DTaxiOrderInfo(){}

    @Builder
    public DTaxiOrderInfo(Integer orderId, String orderCode, Integer orderStatus, Integer orderTaxiNum, Integer orderPrice, Integer taxiId, String taxiAddress) {
        this.orderId = orderId;
        this.orderCode = orderCode;
        this.orderStatus = orderStatus;
        this.orderTaxiNum = orderTaxiNum;
        this.orderPrice = orderPrice;
        this.taxiId = taxiId;
        this.taxiAddress = taxiAddress;
    }
}
